Skip to content

Conversation

@NachoFLizaur
Copy link
Contributor

What does this PR do?

Fixes #12280

getSmallModel() returns the first model matching a priority string from the provider models. Due to models.dev JSON key ordering, EU-prefixed models are returned first, causing title generation to fail when the configured AWS Region is not in eu.

The fix adds Bedrock-specific logic to prefer global. prefixed models, with fallback to regional prefix (us., eu.) depending on the user's region.

Support for other regional prefixes (jp, apac, au) not added as models.dev doesn't support them at the moment.

How did you verify your code works?

After the fix, I tested by setting AWS_REGION to a non-european region (us-west-2) and verifying that the title was generated correctly.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

lgtm

@rekram1-node rekram1-node merged commit 18749c1 into anomalyco:dev Feb 6, 2026
6 checks passed
kyashrathore pushed a commit to kyashrathore/Claxedo that referenced this pull request Feb 7, 2026
fanjia1024 pushed a commit to fanjia1024/opencode that referenced this pull request Feb 10, 2026
BryceRyan pushed a commit to BryceRyan/opencode that referenced this pull request Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session title generation fails for non-EU Amazon Bedrock regions

2 participants